Presently, mobile devices are capable of connecting to application services via a plurality of access networks and technologies. For example, a mobile device may support voice and/or data communication via second generation (2G), second-and-a-half generation (2.5G), and third generation (3G) mobile communication networks, such as Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), and Universal Mobile Telecommunications System (UMTS), as well as via short-range radio access networks, such as Wireless Local Area Network (WLAN) and Bluetooth®. Some mobile devices are also capable of running multiple voice and/or data connections in parallel such that a mobile device may have a plurality of active connections open via a number of access networks.
A prevailing way of effecting data communication in today's data communication networks is by means of a packet-switched scheme e.g. by using the protocols of the Transmission Control Protocol/Internet Protocol (TCP/IP) protocol family. The packet-switched scheme is becoming commonplace also in voice communication, where voice data is carried in data packets over a packet-switched network, such as an IP network.
If an application run e.g. on a mobile device is to send data to and receive data from a server application that is running on a server located e.g. in an operator's core network or the Internet, a data communication session needs to be established between the mobile device and the server. Establishing a data communication session typically requires setup and configuration of transmission services on a number of layers of the OSI model, wherein some of the transmission services may be connection-oriented services and others connectionless services. For example, if a web browser of a mobile device is requested to retrieve the content of a web page from a web server via a WLAN access network, a data link layer connection (layer 2 or L2 connection) needs to be set up through the WLAN access network and configured accordingly.
If a plurality of applications are running on a mobile device such that several applications are connected to network services, e.g. to a web service or email service, multiple network access connections may be required. In some mobile devices, an application establishes L2 connections by using suitable means, such as by an Application Programming Interface (API) through which the application directly instructs set up and configuration of an L2 connection, or the setup and configuration of L2 connections are controlled by the operating system of the mobile device.
In order to reduce power consumption, a mobile device may initially be in a state where it is not attached to any network. A network attachment occurs when an L2 connection to a radio access network is initiated. This means, that the properties of the network and services available to the mobile device are not known prior to initiating the first L2 connection.
Presently, multiple connections to an access network are implemented as multiple single connections. This means, that if e.g. an application on a mobile device establishes two data communication connections through an access network, L2 connections are established for both data communication connections, and L3 connections (layer 3 or network layer connections) are directed through the L2 connections, respectively. The mobile device may also establish said L2 connections, even though data transmission has not yet started, i.e. the application may initiate the L2 connections to be assigned to the L3 connections later when a need for data transmission arises.
Access to a particular service may require a connection via a certain network. For example, access to a company's intranet may require a VPN (Virtual Private Network) connection in the form of IPSec (IP Security Architecture) tunneling between a communication device and an access gateway of the company's network, and some networks may not allow IPSec tunneling. Some of the networks available to the communication device may also meet a user's preferences, such as those pertaining to communication costs, better than other networks. In such situations, a user of the communication device may have to choose, which network to use, i.e. the user may have to choose, to which network an application establishes an L2 connection.
Mobile devices are typically also capable of roaming. For example, a mobile device that supports WLAN and GPRS may be able to migrate a data communication connection from a WLAN to a GPRS network and vice versa. When migrating a connection from one access network to another, which a mobile device has not accessed earlier, the mobile device may encounter a situation essentially similar to that the mobile device encounters when initiating the first connection after a state where the mobile device is not attached to a network. In other words, properties of the target network and services available to the mobile device are not known prior to migrating the connection.